package com.ibuonline.b2b.entity;

import java.io.Serializable;

public class CompanyMetaInfo implements Serializable {

	private static final long serialVersionUID = 4000946903783465971L;

	//fields
	private java.lang.Integer companyId;
	private java.lang.String type;
	private java.lang.String title;
	private java.lang.String keywords;
	private java.lang.String description;
	private java.sql.Timestamp lastupdate;

	//default constructor
	public CompanyMetaInfo() {
	}

	//constructor with arguments
	public CompanyMetaInfo(java.lang.Integer companyId, java.lang.String type) {
		this.companyId = companyId;
		this.type = type;
	}

	//getter
	public java.lang.Integer getCompanyId() {
		return companyId;
	}
	public java.lang.String getType() {
		return type;
	}
	public java.lang.String getTitle() {
		return title;
	}
	public java.lang.String getKeywords() {
		return keywords;
	}
	public java.lang.String getDescription() {
		return description;
	}
	public java.sql.Timestamp getLastupdate() {
		return lastupdate;
	}

	//setter
	public void setCompanyId(java.lang.Integer companyId) {
		this.companyId = companyId;
	}
	public void setType(java.lang.String type) {
		this.type = type;
	}
	public void setTitle(java.lang.String title) {
		this.title = title;
	}
	public void setKeywords(java.lang.String keywords) {
		this.keywords = keywords;
	}
	public void setDescription(java.lang.String description) {
		this.description = description;
	}
	public void setLastupdate(java.sql.Timestamp lastupdate) {
		this.lastupdate = lastupdate;
	}

	//equals method
	public boolean equals(Object other) {
		if (this == other)
			return true;
		if (!(other instanceof CompanyMetaInfo))
			return false;

		final CompanyMetaInfo companyMetaInfo = (CompanyMetaInfo)other;
		if (!this.companyId.equals(companyMetaInfo.getCompanyId()) || 
			!this.type.equals(companyMetaInfo.getType()))
			return false;

		return true;
	}

	//hashCode method
	public int hashCode() {
		StringBuffer keys = new StringBuffer();
		keys.append(companyId).append(",");
		keys.append(type).append(",");
		if (keys.length() > 0)
			keys.deleteCharAt(keys.length() - 1);
		return keys.toString().hashCode();
	}

	//toString method
	public String toString() {
		return new StringBuilder("CompanyMetaInfo[")
			.append("companyId=").append(companyId).append(", ")
			.append("type=").append(type).append(", ")
			.append("title=").append(title).append(", ")
			.append("keywords=").append(keywords).append(", ")
			.append("description=").append(description).append(", ")
			.append("lastupdate=").append(lastupdate).append("]").toString();
	}
}